<?php
class ParentClass{
        function foo()
        {
                echo "This is ParentClass";
        }
}
class SubClass extends ParentClass{
        var $category;
        function setCategory($category)
        {
                $this->category = $category;

        }
        function getCategory(){
                return $this->category;
        }
        function foo(){
                echo "this is SubClass";
        }
        static function staticFoo()
        {
                echo "This is static method of SubClass";
        }
}
$obj = new SubClass();
$obj->foo();
echo "\n";
// $obj->staticFoo();
SubClass::staticFoo();
?>